import Vue from 'vue'
import VueRouter from 'vue-router'

import Index from '@/views/index/index.vue'
import Product from '@/views/product/index.vue'
import Studio from '@/views/studio/index.vue'
import Join from '@/views/join/index.vue'
import About from '@/views/about/index.vue'
import Software from '@/views/product/software/index.vue'
import Course from '@/views/product/course/index.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    { path: '/', name: 'index', component: Index },
    {
      path: '/product',
      name: 'product',
      component: Product,
      children: [
        { path: '/software', name: 'software', component: Software },
        { path: '/course', name: 'course', component: Course }
      ]
    },
    { path: '/studio', name: 'studio', component: Studio },
    { path: '/join', name: 'join', component: Join },
    { path: '/about', name: 'about', component: About }

  ]
})

export default router
